#!/bin/sh
dateStr=$(date +%Y_%m_%d__%H_%M_%S)
dmpPath=/media/D/data/dmdbms/dmp_bak/dmp/DIRECTORS_SUPERVISORS

echo "------------------------------$dateStr------------------------------------------"

#删除超过7天的文件
find $dmpPath/ -type f -mtime +7 -exec rm -f {} \;


fileName="$dateStr"_DIRECTORS_SUPERVISORS.dmp
logName=exp_"$dateStr".log

#导出
/media/D/data/dmdbms/bin/dexp "SYSDBA"/"Sinosoft77675998"@LOCALHOST:5236 DIRECTORY="$dmpPath" FILE="$fileName" LOG="$logName" SCHEMAS="\"DIRECTORS_SUPERVISORS\"" COMPRESS=Y TABLESPACE=N DROP=N LOG_WRITE=Y

echo "------------------------------------------------------------------------"

